package lab02.test29;

public class Test29 {
    public static void main(String[] args) {
        int[] numbers = new int [5];
        numbers[0] = 12;
        numbers[1] = 13;
        numbers[2] = 16;
        numbers[3] = 73;
        numbers[4] = 65;

        try{
            //可能出错的代码
            System.out.println(numbers[5]);
        }catch (ArrayIndexOutOfBoundsException e){
            //出的什么错误
            //出的错如何处理
            System.out.println("数组下标越界");
        }finally {
            //不管怎样都会运行的代码
            System.out.println("最终会输出的代码");
        }
    }
}
